package com.example.btnapplication;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.GridLayout;

public class MyTestView extends GridLayout  {

	public MyTestView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public MyTestView(Context context, AttributeSet attrs) {
		super(context, attrs);
		// 引用XML文件
		LayoutInflater layoutInflater = (LayoutInflater) context
				.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		layoutInflater.inflate(R.layout.view_mytestview, this);
	}
	public MyTestView(Context context) {
		super(context);
	}
}
